<template>
  <div id="admin_jsgl">
    <div class="while">
      <el-tabs @tab-click="tabclick" v-model="activeName">
        <el-tab-pane label="审核成功" name='1'>
          <!-- <table1 :parent="this" ref="table1"></table1> -->
        </el-tab-pane>
        <el-tab-pane label="待审核" name="0">
          <!-- <table1 :parent="this" ref="table1"></table1> -->
        </el-tab-pane>
        <el-tab-pane label="审核失败" name="2">
          <!-- <table1 :parent="this" ref="table1"></table1> -->
        </el-tab-pane>
      </el-tabs>
      <p>共有数据：{{total}}条</p>
      <!-- 表格 -->
      <table1 :parent="this" ref="table1"></table1>
      <!-- 页码 -->
      <yema :parent="this"></yema>
    </div>

  </div>
</template>

<script>
  import table1 from "../table/table_zbfdw.vue"
  export default {
    name: "zbfdw",
    components: {
      table1,
    },
    data() {
      return {
        activeName: '1',
        pageNum: 1,
        pageSize: 11,
        total: 0,
        data: [],
      }
    },
    methods: {
      //修改head顶部的信息
      getHeadTitle(){
        this.$store.state.headTitle_2 = this.$t("lang.unit_join");;
        this.$store.state.headicon = "el-icon-apple";
        this.$store.state.headTitle = this.$t("lang.user_management");
        this.$store.state.show = true;
      },
      tabclick(){
        this.getData();
      },
      // 获取表格数据
      getData(){
        this.$axios.request({
          url: this.API + "/user/enterCompany/list",
          params: {
            pageSize: this.pageSize,
            pageNum: this.pageNum,
            accountStatus: this.$refs.table1.accountStatus,
            companyNameOrTel: this.$refs.table1.companyNameOrTel,
            checkStatus: parseInt(this.activeName)
          },
          method: "get"
        }).then((res) => {
          // console.log(res)
          this.pageNum = res.data.pageNum;
          this.total = res.data.total;
          this.data = res.data.rows;
        })
      },
    },
    mounted() {
      this.getHeadTitle();
      this.getData();
    }
  }
</script>

<style>
  #admin_jsgl {
    height: 100%;
    background: #eaeff7;
  }

  .while {
    background-color: #FFFFFF;
    margin: 20px;
    border-radius: 5px;
    padding: 15px;
  }

  #admin_jsgl h1 {
    margin: 0;
    font-weight: inherit;
    color: #818181;
  }

  #admin_jsgl .el-divider {
    margin: 8px 0px;
  }
  .while:hover{
    box-shadow: -5px -5px 10px #b5b5c5;
  }
  .while p{
    color: #5e5e5e;
    font-size: 14px;
    margin-top: 3px;
  }
</style>
